﻿using System.Data.Entity;
using EMRI.EmergencyCare.Web.Models;

namespace EMRI.EmergencyCare.Web.DataContext
{
    public class EmergencyManagementContext : DbContext
    {
        // You can add custom code to this file. Changes will not be overwritten.
        // 
        // If you want Entity Framework to drop and regenerate your database
        // automatically whenever you change your model schema, add the following
        // code to the Application_Start method in your Global.asax file.
        // Note: this will destroy and re-create your database with every model change.
        // 
        // System.Data.Entity.Database.SetInitializer(new System.Data.Entity.DropCreateDatabaseIfModelChanges<EMRI.EmergencyCare.Web.Models.EmergencyManagementContext>());

        public EmergencyManagementContext() : base("name=EmergencyManagementContext")
        {
           
        }

        //protected override void OnModelCreating(DbModelBuilder modelBuilder)
        //{
        //    modelBuilder.Entity<DetailedAssesment>()
        //        .HasMany(r => r.Readings);

        //    base.OnModelCreating(modelBuilder);
        //}

        public DbSet<Patient> Patients { get; set; }

        public DbSet<PatientDetails> PatientDetails { get; set; }

        public DbSet<EmergencyType> EmergencyTypes { get; set; }
        
        public DbSet<CauseOfEmegrncy> CauseEmergencies { get; set; }
        
        public DbSet<MechanismOfInjury> MechanismInjuries { get; set; }
        
        public DbSet<AnatamicalOfEmergency> AnatomicalEmergencies { get; set; }
        
        public DbSet<IncidentLocation> IncidentLocations { get; set; }
        
        public DbSet<CheifComplaint> CheifComplaints { get; set; }

        public DbSet<Location> Locations { get; set; }

        public DbSet<District> Districts { get; set; }

        public DbSet<Taluk> Taluks { get; set; }

        public DbSet<City> Cities { get; set; }

        public DbSet<CareBefore> CareBeforeRoom { get; set; }

        public DbSet<BroughtBy> BroughtBy { get; set; }

        public DbSet<DoctorList> DoctorsList { get; set; }

        public DbSet<SocialHabits> SocialHabits { get; set; }

        public DbSet<MCI> MCIs { get; set; }
        public DbSet<HospitalNameList> HospitalsList { get; set; }
        public DbSet<ParamedicList> Paramedicslist { get; set; }
    }
}
